//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig___________________4Conditions takes nothing returns boolean
    return ((GetOwningPlayer(GetTriggerUnit()) != Player(0)) and (GetOwningPlayer(GetTriggerUnit()) != Player(1)) and (GetOwningPlayer(GetTriggerUnit()) != Player(2)) and (GetOwningPlayer(GetTriggerUnit()) != Player(3)))
endfunction

function Trig___________________4Actions takes nothing returns nothing
    local location p = GetRectCenter(gg_rct_goal4)
    call IssuePointOrderByIdLoc(GetTriggerUnit(), 851986, p)
    set p = null
endfunction

//===========================================================================
function InitTrig___________________4 takes nothing returns nothing
    set gg_trg___________________4 = CreateTrigger()
#ifdef DEBUG
    call YDWESaveTriggerName(gg_trg___________________4, "单位移动至点4")
#endif
    call TriggerRegisterEnterRectSimple(gg_trg___________________4, gg_rct_goal3)
    call TriggerRegisterEnterRectSimple(gg_trg___________________4, gg_rct_turn_4_2)
    call TriggerAddCondition(gg_trg___________________4, Condition(function Trig___________________4Conditions))
    call TriggerAddAction(gg_trg___________________4, function Trig___________________4Actions)
endfunction

